using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Sampling
{
    /// <summary>
    /// <para>Create Random Points</para>
    /// <para>Creates a specified number of random point features. Random points can be generated in an extent window, inside polygon features, on point features, or along line features.</para>
    /// <para>创建指定数量的随机点要素。可以在范围窗口、面要素内、点上要素或沿线要素中生成随机点。</para>
    /// </summary>    
    [DisplayName("Create Random Points")]
    public class CreateRandomPoints : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateRandomPoints()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_out_path">
        /// <para>Output Location</para>
        /// <para>The location or workspace in which the random points feature class will be created. This location or workspace must already exist.</para>
        /// <para>将在其中创建随机点要素类的位置或工作空间。此位置或工作区必须已存在。</para>
        /// </param>
        /// <param name="_out_name">
        /// <para>Output Point Feature Class</para>
        /// <para>The name of the random points feature class to be created.</para>
        /// <para>要创建的随机点要素类的名称。</para>
        /// </param>
        public CreateRandomPoints(object _out_path, object _out_name)
        {
            this._out_path = _out_path;
            this._out_name = _out_name;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Create Random Points";

        public override string CallName => "management.CreateRandomPoints";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "extent", "geographicTransformations", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "randomGenerator", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_out_path, _out_name, _constraining_feature_class, _constraining_extent, _number_of_points_or_field, _minimum_allowed_distance, _create_multipoint_output.GetGPValue(), _multipoint_size, _out_feature_class];

        /// <summary>
        /// <para>Output Location</para>
        /// <para>The location or workspace in which the random points feature class will be created. This location or workspace must already exist.</para>
        /// <para>将在其中创建随机点要素类的位置或工作空间。此位置或工作区必须已存在。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Location")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_path { get; set; }


        /// <summary>
        /// <para>Output Point Feature Class</para>
        /// <para>The name of the random points feature class to be created.</para>
        /// <para>要创建的随机点要素类的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Point Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_name { get; set; }


        /// <summary>
        /// <para>Constraining Feature Class</para>
        /// <para>Random points will be generated inside or along the features in this feature class. The constraining feature class can be point, multipoint, line, or polygon. Points will be randomly placed inside polygon features, along line features, or at point feature locations. Each feature in this feature class will have the specified number of points generated inside it (for example, if you specify 100 points, and the constraining feature class has 5 features, 100 random points will be generated in each feature, totaling 500 points).</para>
        /// <para>将在此要素类的要素内部或沿线生成随机点。约束要素类可以是点、多点、线或面。点将随机放置在面要素内、沿线要素或点要素位置。此要素类中的每个要素都将具有在其内部生成的指定点数（例如，如果指定 100 个点，而约束要素类具有 5 个要素，则每个要素中将生成 100 个随机点，共计 500 个点）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Constraining Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _constraining_feature_class { get; set; } = null;


        /// <summary>
        /// <para>Constraining Extent</para>
        /// <para>Random points will be generated inside the extent. The constraining extent will only be used if no constraining feature class is specified.</para>
        /// <para>将在范围内生成随机点。仅当未指定约束要素类时，才会使用约束范围。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Constraining Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _constraining_extent { get; set; } = null;


        /// <summary>
        /// <para>Number of Points [value or field]</para>
        /// <para><xdoc>
        ///   <para>The number of points to be randomly generated.</para>
        ///   <para>The number of points can be specified as a long integer number or as a field from the constraining features containing numeric values for how many random points to place within each feature. The field option is only valid for polygon or line constraining features. If the number of points is supplied as a long integer number, each feature in the constraining feature class will have that number of random points generated inside or along it.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要随机生成的点数。</para>
        ///   <para>点数可以指定为长整数，也可以指定为约束要素中的字段，该字段包含在每个要素中放置的随机点数的数值。字段选项仅对面或线约束要素有效。如果点数以长整数形式提供，则约束要素类中的每个要素都将在其内部或沿其内部或沿其生成该数量的随机点。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Points [value or field]")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _number_of_points_or_field { get; set; } = null;


        /// <summary>
        /// <para>Minimum Allowed Distance [value or field]</para>
        /// <para>The shortest distance allowed between any two randomly placed points. If a value of 1 Meter is specified, all random points will be farther than 1 meter away from the closest point.</para>
        /// <para>任意两个随机放置的点之间允许的最短距离。如果指定值为 1 米，则所有随机点与最近点的距离将超过 1 米。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Allowed Distance [value or field]")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _minimum_allowed_distance { get; set; } = null;


        /// <summary>
        /// <para>Create Multipoint Output</para>
        /// <para><xdoc>
        ///   <para>Determines if the output feature class will be a multipart or single-part feature.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The output will be geometry type point (each point is a separate feature). This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The output will be geometry type multipoint (all points are a single feature).</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定输出要素类是多部分要素还是单部分要素。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 输出将为几何类型点（每个点都是一个单独的要素）。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 输出将为几何类型多点 （所有点均为单个要素）。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create Multipoint Output")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _create_multipoint_output_value _create_multipoint_output { get; set; } = _create_multipoint_output_value._false;

        public enum _create_multipoint_output_value
        {
            /// <summary>
            /// <para>MULTIPOINT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MULTIPOINT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>POINT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("POINT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Maximum Number of Points per Multipoint</para>
        /// <para>If Create Multipoint Output is checked, specify the number of random points to be placed in each multipoint geometry.</para>
        /// <para>如果选中了创建多点输出，请指定要放置在每个多点几何中的随机点数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Number of Points per Multipoint")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _multipoint_size { get; set; } = 10;


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public CreateRandomPoints SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object randomGenerator = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, randomGenerator: randomGenerator, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}